package org.vacoor.nothing.web.misc.license;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {
    private static final String a = "yyyyMMdd";

    public static int formatDate(Date paramDate) {
        return Integer.valueOf(new SimpleDateFormat("yyyyMMdd").format(paramDate)).intValue();
    }

    public static Date parseDate(int paramInt) {
        try {
            return new SimpleDateFormat().parse(Integer.toString(paramInt));
        } catch (ParseException localParseException) {
        }
        throw new IllegalArgumentException("Could not retrieve date form version. Accepted only: yyyyMMdd, found:" + String.valueOf(paramInt));
    }
}